Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable asserts in release builds when using Swift Package Manager #44

Merged
merged 1 commit into from
Dec 12, 2021

Conversation

rcancro
Copy link
Contributor

@rcancro rcancro commented Dec 11, 2021

When using Swift Package Manager to integrate PINOperation into an app, Xcode does not automatically set NS_BLOCK_ASSERTIONS to 1 when building the package in release. This means that any NSAsserts that are hit in release cause crashes. This appears to only be an issue with ObjC packages.

The change I've made is to Package.swift to set NS_BLOCK_ASSERTIONS to 1 when building in release.

(Note: I didn't actually hit an assert in this PINOperation, but the possibility is there)

@rcancro rcancro merged commit ea79ebf into pinterest:master Dec 12, 2021
@rcancro rcancro deleted the spm branch December 12, 2021 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant